package flex.lms.service;



import java.util.List;

import javax.annotation.Resource;

import org.common.db.query.HQLQuery;
import org.grizzly.entity.OperationEntity;
import org.grizzly.entity.UserEntity;
import org.grizzly.service.BaseService;
import org.springframework.stereotype.Service;

import flex.lms.entity.User;
import flex.lms.entity.demo.CtiConfigEntity;

@Service
public class LoginService {
	
	@Resource
	private BaseService baseService;	
	
	
	public List<User> checkLogin(User user){
		
		String hql = "from User u where u.userName= '"+user.getUserName().trim()+"' and u.passWord='"+user.getPassWord().trim()
		                                              +"' and u.userType="+user.getUserType();
		List<User> userInfoList =  baseService.findObjects(new HQLQuery(hql));
		return userInfoList;
	}


	public List<CtiConfigEntity> getCtiConfigByExtno(String extno) {
		// TODO Auto-generated method stub
		return null;
	}


	public List<OperationEntity> getAllOperList(String id) {
		// TODO Auto-generated method stub
		return null;
	}

}
